<!---- Creator: Eoly -->
<!---- On 2017/1/24 -->
<!---- Call http://palerock.cn -->

<!DOCTYPE html>
<html lang="en" ng-app="groupDetailPage">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>Title</title>
    <link rel="stylesheet" href="sm/sm.min.css">
    <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.css">
</head>
<body>
<div class="page-group">
    <div class="page" id="page-pre" ng-controller="groupDetail"  ng-init="getTheGroupDetail();getAddresses()">
        <header class="bar bar-nav to-padding-top">
            <a class="icon icon-left pull-left" href="javascript:app.backLastPosition();"></a>
            <p class="title">团详情</p>
        </header>
        <nav class="bar bar-tab">
            <a ng-show="!group.groupStatus" ng-click="joinGroup();" class="tab-item external red-white">
                <span class="tab-label">我要参团</span>
            </a>
            <a ng-show="group.groupStatus" class="tab-item external while-gray">
                <span class="tab-label">该团目前不能加入</span>
            </a>
        </nav>
        <div class="content pull-to-refresh-content">
            <!-- 默认的下拉刷新层 -->
            <div class="pull-to-refresh-layer">
                <div class="preloader"></div>
                <div class="pull-to-refresh-arrow"></div>
            </div>

            <!-- 轮播图 -->
            <div class="swiper-container" data-space-between='10'>
                <div class="swiper-wrapper">
                    <div class="swiper-slide" ng-repeat="src in group.imgSrc">
                        <img ng-src="{{src}}" alt="">
                    </div>
                </div>
                <div class="swiper-pagination"></div>
            </div>

            <!-- 团基础属性 -->
            <div class="simple-content">
                <div class="row">
                    <div class="s-price col-50">
                        <p class="group-price">{{group.groupPrice | currency : '￥'}}</p>
                        <p class="group-price-original">原价：<span class="s-original">{{group.groupPriceOriginal | currency : '￥'}}</span></p>
                    </div>
                    <div class="s-status col-50">
                        <p class="group-number">参团人数：{{group.groupNowNumber}}/{{group.groupTargetNumber}}</p>
                        <p class="group-status">{{group.groupStatus | beToGroupStatus}}</p>
                    </div>
                </div>
                <p class="group-title">{{group.groupTitle}}</p>
                <div class="row group-synopsis">
                    <div class="col-20">简介：</div>
                    <div class="col-80">{{group.groupSynopsis}}</div>
                </div>
            </div>

            <!-- 团规格 -->

            <div class="format-content">
                <div class="row group-format">
                    <div class="col-20">规格：</div>
                    <div class="col-80">
                        <span class="each-format" ng-repeat="(formatName, formatValue) in group.format">
                            <span class="format-name">{{formatName}}</span>:
                            <span class="format-value">{{formatValue}}</span>
                        </span>
                    </div>
                </div>
                <div class="row address">
                    <div class="col-20">地址：</div>
                    <div class="col-60">
                        <div class="list-block" style="margin: 0">
                            <select  ng-model="paramJoin.addressId" ng-options="x.addressId as x.addressInfo for x in addresses">
                            </select>
                        </div>
                    </div>
                    <div class="col-20 address-manage" onclick="app.turnHref('group-detail.html','#','user-address.html',true)"><i class="fa fa-edit"></i></div>
                </div>
            </div>

            <!-- 团详细介绍 -->

            <div class="detail-content">
                <div class="d-title">详细介绍：</div>
                <div class="group-detail">{{group.groupDetail}}</div>
                <img class="detail-img"  ng-repeat="src in group.imgSrc" ng-src="{{src}}" alt="">
            </div>

        </div>
    </div>
    <script src="js/angular.js"></script>
    <script src="sm/zepto.min.js"></script>
    <script>$.config = {router: false}</script>
    <script src="sm/sm.min.js"></script>
    <link rel="stylesheet" href="sm/sm-extend.min.css">
    <script type='text/javascript' src='sm/sm-extend.min.js' charset='utf-8'></script>
    <link rel="stylesheet" href="css/group-detail.css">
    <script src="controller/app-init-func.js"></script>
    <script src="controller/group-detail-controller.js"></script>
    <script src="js/group-detail-refresh.js"></script>
</div>
<script>app.suiInit()</script>
</body>
</html>